<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="box">
        <div v-for="i in 20">
            {{i*1234 | filter_all}}
        </div>
    </div>
</body>
<script src="../js/vue.js"></script>
<script>
    Vue.filter('filter_all',(num)=>{
        let changeNum = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']; 
			let unit = ["", "拾", "佰", "仟", "萬"];
			num = parseInt(num);
			let getWan = (temp) => {
				let strArr = temp.toString().split("").reverse();
				let newNum = "";
				for(var i = 0; i < strArr.length; i++) {
					newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum;
				}
				return newNum;
			}
			let overWan = Math.floor(num / 10000);
			let noWan = num % 10000;
			if(noWan.toString().length < 4) noWan = "0" + noWan;
			return overWan ? getWan(overWan) + "萬" + getWan(noWan) : getWan(num)+'整'
    })
    new Vue({
        el:'#box'
    })
</script>
</html>